package com.max.back.demo.form;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * DeptForm
 */
@Data
public class DeptForm {
    public interface Base {
    }

    public interface Find {
    }

    public interface Delete {
    }
    public interface Update extends Base{

    }
    @NotNull(groups = {Update.class, Delete.class},message = "科室id不能为空")
    @Min(value = 1,groups = {Update.class, Delete.class},message = "科室id要大于0")
    private int id;
    @NotBlank(groups = {Base.class, Update.class},message = "科室编号不能为空")
    @Length(max = 36,groups = {Base.class, Update.class},message = "科室编号长度要小于36")
    private String num;
    @NotBlank(groups = {Base.class, Update.class},message = "科室名字不能为空")
    @Length(max = 100,groups = {Base.class, Update.class},message = "科室名字长度要小于100")
    private String name;
    @NotBlank(groups = {Base.class, Update.class},message = "科室类别不能为空")
    @Length(max = 100,groups = {Base.class, Update.class},message = "科室类别长度要小于100")
    private String clas;
    @NotBlank(groups = {Base.class, Update.class},message = "科室类型不能为空")
    @Length(max = 100,groups = {Base.class, Update.class},message = "科室类型长度要小于100")
    private String type;

}
